const reg = new RegExp(/(\w+):\/\/([^/:]+)(:\d*)?/);

export const convertLocalUrl = (url: string) => {
  const result = url.match(reg);

  if (!result) return url;

  return url.replace(result[0], window.location.origin);
  return url;
};
